package cn.zf233.xcloud.commom.enums;

/**
 * Created by zf233 on 2020/1/30
 * 页面名
 */
public enum PageNameENUM {

    PAGE_HOME("home", 0),
    PAGE_INDEX("index", 1),
    PAGE_NOTICE("notice", 5),
    PAGE_ERROR("error", 6);

    private final String describe;
    private final Integer code;

    public static Boolean exists(String describe) {
        for (PageNameENUM pageNameENUM : values()) {
            if (pageNameENUM.getDescribe().equals(describe)) {
                return true;
            }
        }
        return false;
    }

    PageNameENUM(String describe, Integer code) {
        this.code = code;
        this.describe = describe;
    }

    public String getDescribe() {
        return describe;
    }

    public Integer getCode() {
        return code;
    }
}